﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RuleCode.Table;

namespace map
{
    public partial class index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (AliApi.appUserId != string.Empty)
            {
                cbuser user = cbuser.Find("cbuserid='" + AliApi.appUserId + "'");
                if (user.Count > 0)
                {          
                    BizArea bizarea = BizArea.Find("BizAreaName='"+user.cbUserBizArea .Value +"' and 区编码='"+user.区编码.Value +"' and 区域编码='"+user.区域编码 .Value +"' and 县编码='"+user.县编码 .Value +"'");
                    if (bizarea.Count > 0)
                    {
                        Response.Redirect(ResolveUrl("~/search/areadetail.aspx?id="+bizarea.RECID.ToString ()));
                    }
                }
            }

            Response.Redirect(ResolveUrl("~/default.aspx"));
        }
    }
}
